package com.juanLL.CMC;

import android.media.AudioManager;
import android.media.SoundPool;

public class Sound {
	private SoundPool soundPool;
	public int trashThrow;
	public int ratSqueal;
	public int trashCatch;
	public int goodCatch;
	public int badCatch;
	public int music;
	boolean loaded = false;

	public Sound(AssetLoader assetLoader) {
		// Load the sound
		soundPool = new SoundPool(10, AudioManager.STREAM_MUSIC, 0);
		trashThrow = soundPool.load(
				assetLoader.getAFD("sounds/trashThrow.flac"), 1);
		ratSqueal = soundPool.load(assetLoader.getAFD("sounds/ratSqueal.wav"),
				1);
		goodCatch = soundPool.load(assetLoader.getAFD("sounds/goodCatch.wav"),
				1);
		badCatch = soundPool.load(assetLoader.getAFD("sounds/badCatch.wav"), 1);
	}

	public void playSound(int id, int loop) {
		soundPool.play(id, 1, 1, 1, loop, 1);
	}

}
